package com.xcl.service.impl;

import com.xcl.mapper.CategoryMapper;
import com.xcl.pojo.Category;
import com.xcl.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CategoryServiceImpl implements CategoryService {

    @Autowired
    CategoryMapper categoryMapper;

    @Override
    public List<Category> findAll() {
        return categoryMapper.findAll();
    }

    //删除
    @Override
    public Integer deleteById(Integer id) {
        return categoryMapper.deleteById(id);
    }


    //增加
    @Override
    public Integer addCategory(Category category) {
        return categoryMapper.addCategory(category);
    }

    @Override
    public Integer update(Category category) {
        return categoryMapper.update(category);
    }
}
